{% extends "base_restau.html" %}
{% load dajaxice_templatetags %}
{% load i18n %}

	{% block header %}
	{% dajaxice_js_import %}
	    <script type="text/javascript" src="{{STATIC_URL}}javascript/jquery.js"></script>
	    <script type="text/javascript" src="{{STATIC_URL}}javascript/display_stars.js"></script>
		<link rel="stylesheet" media="screen" type="text/css" title="Essai" href="{{STATIC_URL}}css/stars.css" />
		<script type="text/javascript">
			$(function() {
    			$('span.stars').stars();
			});
		</script>
        <script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false&language={{request.LANGUAGE_CODE}}"></script>
        <script type='text/javascript'>
                var barycentre_latitude = {{ barycentre_latitude }}
                var barycentre_longitude = {{ barycentre_longitude }}
                var invite_latitude =  {{ invite_latitude }}
                var invite_longitude = {{ invite_longitude }}
                var invit_id = {{ invit_id }}
                var email = '{{ email }}'
                function callback() {
    				$('#confirm').html('Confirmation envoyée');
				}
        </script>
        <script type="text/javascript" src="{{STATIC_URL}}javascript/script_resultat.js"></script>
    {% endblock %}
	
	{% block titre %}{% trans "Le restaurant choisi est" %} : <a href={{url}}>{{restaurant_nom}}</a></h2>{% endblock %}

	{% block menu %}	
		<ul id="navigation">
			<li> <img src="{{STATIC_URL}}images/26.png" alt=""/>{% trans "Civilité" %}</li>
			<li> <img src="{{STATIC_URL}}images/27.png" alt=""/>{% trans "Invités" %}</li>
			<li> <img src="{{STATIC_URL}}images/28.png" alt=""/>{% trans "Goûts" %}</li>
			<li> <img src="{{STATIC_URL}}images/29.png" alt=""/>{% trans "Réponse" %}</li>
			<li> <img src="{{STATIC_URL}}images/30.png" alt=""/>{% trans "Résultat" %}</li>
		</ul>
	{% endblock %}

	{% block content %}
		{% if pas_confirme %}
			<button id="confirm" type="button" value="Confirmation" onclick="this.disabled=true; Dajaxice.EssaiAVA.ava.confirm_restau(callback, {'email': email, 'invit_id': invit_id})">{% trans "Confirmer votre présence" %}</button></p>
		{% endif %}
        <div> 
	        <select id="mode" onchange="carte_resultat();">
	            <option value="DRIVING">{% trans "En voiture" %}</option>
	            <option value="WALKING">{% trans "A pied" %}</option>
	        </select>
        </div>
        <div id="map_canvas"></div>
        <div id="map_direction"></div>
		<div class='clr'></div>
		<div id='table_result'>
			<table border='1'>
			<caption>{% trans "Résultats" %}</caption>
			{% for rep in tous_les_choix %}
				<tr>
					<th>{{ rep.0 }}</th>
					{% for crit in rep.1 %}
					<th>{{ crit.0}}</th>
					<th><span class="stars">{{ crit.1}}</span></th>
					{% endfor %}
				</tr>
			{% endfor %}
			</table>
		</div>
	{% endblock %}
    
 